Skip to content

Sharedlink password - #623

Merged
carycheng merged 6 commits into
masterfrom
sharedlink_password
Jul 5, 2018
Merged

carycheng merged 6 commits into
masterfrom
sharedlink_password

Conversation

@carycheng

Copy link
Copy Markdown

No description provided.

@carycheng
carycheng requested a review from mattwiller July 2, 2018 18:50
@boxcla

boxcla commented Jul 2, 2018

Copy link
Copy Markdown

Hi @carycheng, thanks for the pull request. Before we can merge it, we need you to sign our Contributor License Agreement. You can do so electronically here: http://opensource.box.com/cla

Once you have signed, just add a comment to this pull request saying, "CLA signed". Thanks!

@carycheng carycheng mentioned this pull request Jul 2, 2018
1 task done
.withHeader("Content-Type", "application/json")
.withBody(result)));

WIRE_MOCK_CLASS_RULE.stubFor(WireMock.put(WireMock.urlPathEqualTo("/files/" + fileID))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test actually make three API calls to the same URL? Can you add comments to describe which calls these correspond to?


permissions.setCanDownload(true);
permissions.setCanPreview(true);
BoxSharedLink sharedLink = file.createSharedLink(BoxSharedLink.Access.OPEN, null, permissions);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to allow setting the password in this call instead? It would be much nicer for users to not have to make two API calls.

@mattwiller

Copy link
Copy Markdown

Looks good — could you update the test to use the single-call way of setting the password to ensure that works correctly?

@carycheng
carycheng merged commit 1986cf5 into master Jul 5, 2018
@carycheng
carycheng deleted the sharedlink_password branch July 5, 2018 23:57
@coveralls

coveralls commented Jul 5, 2018 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 1701

  • 24 of 25 (96.0%) changed or added relevant lines in 4 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 58.138%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/box/sdk/BoxSharedLink.java 9 10 90.0%
Files with Coverage Reduction New Missed Lines %
src/main/java/com/box/sdk/BoxAPIRequest.java 2 63.28%
src/main/java/com/box/sdk/RealtimeServerConnection.java 3 80.0%
Totals Coverage Status
Change from base Build 1699: 0.2%
Covered Lines: 4483
Relevant Lines: 7711

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants